home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
drivexx.exe
/
DRIVEXX.TXT
< prev
next >
Wrap
Text File
|
1993-01-22
|
42KB
|
915 lines
(********************************************************************)
(* DRIVExx *)
(* *)
(* Version 4.0 *)
(* *)
(* Copyright (C) 1991-1993 by FeerKnott Computing *)
(* *)
(* Portions Copyright (C) 1992 by PDG Software *)
(* *)
(* 3922 Englewood Drive *)
(* Champaign, IL 61821 *)
(* *)
(* (217) 355-8145 (voice) *)
(* (217) 355-9661 (modem) *)
(* CIS [71160,1045] *)
(* *)
(* ALL RIGHTS RESERVED *)
(********************************************************************)
(********************************************************************)
(* Written by: Charles B. Little, Ph.D. *)
(* Version: 4.00 *)
(* Revision Date: 22 January 1993 *)
(* Language: Turbo Pascal v7 *)
(********************************************************************)
I. INTRODUCTION:
DRIVExx is a collection of tools, written in Turbo Pascal v7 (v6 TPU
available on request), for dealing with block devices in a DOS
environment. To the best of our knowledge, no such tools exist in any
"professional" programming toolboxes, in any programming language.
The tools available here will allow any Pascal programmer who uses
disk I/O to gain that extra measure of control over his or her
application. At the very least they will have the ability to prevent
access of a phantom drive so their nice user interface won't get
overwritten by non-interceptable DOS messages like "Insert diskette
for drive B: and ..."
No pretense is made that DRIVExx is flawless and can't be confused by
a determined user who knows all the SUBST, JOIN and ASSIGN tricks, but
it seems to work for the things most programmers need. And just about
everything you'd want your applications to know about drives is
available WITHOUT ACCESSING THEM! The only exceptions to hitting
drives are functions GETDPB and DiskWasChanged: GETDPB will hit the
disk to read its boot sector, BUT ONLY IF YOU TELL IT TO; and
DiskWasChanged will use a BIOS function that spins the disk ONLY if
the drive supports changeline detection. And even in these two cases,
NO unrecoverable error will result if the functions are executed on a
removable drive that doesn't have a disk in it.
Much of the required information is available only through
undocumented DOS functions and data structures. Wherever a documented
function will return the same information, however, the undocumented
function is still used as a redundancy check. Indeed, the source code
for DRIVExx is probably at least 50% longer than need be due to
extensive interlocking redundancy checking.
Most of the features of DRIVExx are demonstrated in the demo program
DRVDEMO.PAS. The major exceptions are functions ReadDiskSectors and
WriteDiskSectors, and function MakeDriveActive, whose description
below should make clear why it is impractical to include it in
DRVDEMO.
DRIVExx is currently available only for TP7, but a TP6 format TPU is
available on request. We made the decision to use BASM for all
assembler modules to eliminate the need to distribute OBJ files. This
means that all you need to use DRIVExx is DRIVEXX.TPU. Consideration
will be given to releasing a TP5 version, or even porting to C - if
enough users express a desire.
II. CONDITIONS:
DRIVExx is not free. IT IS SHAREWARE AND IT IS COPYRIGHTED. If you
use it you should pay for it -- that's how shareware works. However,
you only pay the registration fee. Absolutely no royalties are
expected or will be sought if you use it in any commercial program.
It comes with the usual caveats (spelled out in the REGISTRATION/ORDER
FORM) about suitability, limits of liability, etc.
The registration fee is $10. Fees for DRIVExx should be accompanied
by a completed REGISTRATION/ORDER FORM, found in the file
REGISTER.TXT. A non-disclosure agreement with a major vendor will
make it impossible to release the ENTIRE source code as is. A
working, compilable version - EXCLUDING the small amount of code
covered by the NDA - may be made available. If so, we will tell you
where to find the "forbidden" information yourself in a book called
"PC Interrupts"; it will still be up to you to write the code. Fees
and distribution agreements for source code have not yet been
established.
Since DRIVExx has not been tested on every conceivable platform and
under every flavor of DOS out there, special consideration (i.e., fee
waiver or free upgrades) will be given to any user who reports bugs or
anomalous behavior, and can suggest a fix. IN OTHER WORDS, BE A BETA
TESTER AND GET DRIVExx FREE FOREVER!
You may distribute DRIVExx freely as long as all 7 files in the
original ZIP file are distributed. Those files are:
DRIVExx.TXT size = 39389, date = 1/22/93, time = 4:00am
(This file)
REGISTER.TXT size = 1944, date = 1/22/93, time = 4:00am
(Product registration form)
DRIVExx.TPU size = 22160, date = 1/22/93, time = 4:00am
DRVDEMO.PAS size = 6349, date = 1/22/93, time = 4:00am
(Demo program source code - must have DRIVExx.TPU and DRVDEMO.INC to
recompile)
DRVDEMO.INC size = 5882, date = 1/22/93, time = 4:00am
DRVDEMO.EXE size = 32224, date = 1/22/93, time = 4:00am
(Ready to run demo program)
NTRFACE.TXT size = 10827, date = 1/22/93, time = 4:00am
(Actual INTERFACE section from DRIVExx.PAS)
See section VIII for details on product support.
III. REQUIREMENTS:
DOS versions supported: MS-DOS or PC-DOS 3.0 to 5.0; DR DOS 5 or 6.
Hardware supported: IBM or IBM-compatible PC, XT, AT, or PS/2.
IV. ACKNOWLEDGEMENTS:
MS-DOS and SMARTDRV are trademarks of the Microsoft Corporation
DR DOS is a trademark of Digital Research, Inc.
PC Tools Deluxe is a trademark of Central Point Software
NCACHE is a trademark of Symantec Corporation
Stacker is a trademark of Stac Electronics
NetWare is a trademark of Novell
Any PRODUCT NAME used in this document, but not mentioned above, is
likely to be a registered trademark of the company that makes the
product. There.
DRIVExx is based on information found in the following monographs:
The MS-DOS Encyclopedia, R. Duncan, ed., Microsoft Press, 1988
MS-DOS Programmer's Reference, Microsoft Press, 1991
Advanced MS-DOS Programming, R. Duncan, Microsoft Press, 1988
Undocumented DOS, Schulman, et. al., eds., 1990
DOS Programmer's Reference, 3rd ed, Dettmann & Johnson, eds., 1992
PC Interrupts, Brown and Kyle, Addison-Wesley, 1991
System BIOS for ..., Phoenix Technologies, Addison-Wesley, 1989
The Programmer's PC Sourcebook, T. Hogan, Microsoft Press, 1991
V. VERSION NOTES:
This version of DRIVExx contains the expected code refinements and bug
fixes for previous versions, but it also is missing some features of
previous versions that we thought were pretty useful. The function
"DriveIsDeviceDriven" is the main casualty in DRIVExx version 4,
thanks to the release of SmartDrv version 4. This little Microsoft
monster makes it impossible (as far as we know) to walk the device
driver chain and match up drives with device drivers and thereby
distinguish BIOS-dri